package com.woniuxy.orderserver.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;

/**
 * 
 * @TableName finance_order_detail
 */
@TableName(value ="finance_order_detail")
@Data
public class FinanceOrderDetail implements Serializable {
    /**
     * 主键
     */
    @TableId(type = IdType.AUTO)
    private Long id;

    /**
     * 订单ID
     */
    private Long financeOrderId;

    /**
     * skuID
     */
    private Long financeSkuId;

    /**
     * 购买数量
     */
    private Integer financeNum;

    /**
     * 商品金额
     */
    private BigDecimal financePrice;

    /**
     * 创建时间
     */
    private Date createTime;

    /**
     * 创建人
     */
    private String createBy;

    /**
     * 修改时间
     */
    private Date updateTime;

    /**
     * 修改人
     */
    private String updateBy;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        FinanceOrderDetail other = (FinanceOrderDetail) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getFinanceOrderId() == null ? other.getFinanceOrderId() == null : this.getFinanceOrderId().equals(other.getFinanceOrderId()))
            && (this.getFinanceSkuId() == null ? other.getFinanceSkuId() == null : this.getFinanceSkuId().equals(other.getFinanceSkuId()))
            && (this.getFinanceNum() == null ? other.getFinanceNum() == null : this.getFinanceNum().equals(other.getFinanceNum()))
            && (this.getFinancePrice() == null ? other.getFinancePrice() == null : this.getFinancePrice().equals(other.getFinancePrice()))
            && (this.getCreateTime() == null ? other.getCreateTime() == null : this.getCreateTime().equals(other.getCreateTime()))
            && (this.getCreateBy() == null ? other.getCreateBy() == null : this.getCreateBy().equals(other.getCreateBy()))
            && (this.getUpdateTime() == null ? other.getUpdateTime() == null : this.getUpdateTime().equals(other.getUpdateTime()))
            && (this.getUpdateBy() == null ? other.getUpdateBy() == null : this.getUpdateBy().equals(other.getUpdateBy()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getFinanceOrderId() == null) ? 0 : getFinanceOrderId().hashCode());
        result = prime * result + ((getFinanceSkuId() == null) ? 0 : getFinanceSkuId().hashCode());
        result = prime * result + ((getFinanceNum() == null) ? 0 : getFinanceNum().hashCode());
        result = prime * result + ((getFinancePrice() == null) ? 0 : getFinancePrice().hashCode());
        result = prime * result + ((getCreateTime() == null) ? 0 : getCreateTime().hashCode());
        result = prime * result + ((getCreateBy() == null) ? 0 : getCreateBy().hashCode());
        result = prime * result + ((getUpdateTime() == null) ? 0 : getUpdateTime().hashCode());
        result = prime * result + ((getUpdateBy() == null) ? 0 : getUpdateBy().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", financeOrderId=").append(financeOrderId);
        sb.append(", financeSkuId=").append(financeSkuId);
        sb.append(", financeNum=").append(financeNum);
        sb.append(", financePrice=").append(financePrice);
        sb.append(", createTime=").append(createTime);
        sb.append(", createBy=").append(createBy);
        sb.append(", updateTime=").append(updateTime);
        sb.append(", updateBy=").append(updateBy);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}